<?php 
$request = system_controller_front::getInstance()->getRequest();
$furl = (string) $this->url('account/index');
if(1 && $callback = $request->getQuery('callback')) {
	$furl = $callback;
}
?>
<div id="mainDiv">
	<div id="tree">
		<div id="treeData">	
			<h1><?php echo $this->language('Dashboard');?></h1>	
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('My Account');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('account/setting');?>"><?php echo $this->language('General Setting');?></a></li>
					<li><a href="<?php echo $this->url('account/password');?>"><?php echo $this->language('Change Password');?></a></li>
					<li><a href="<?php echo $this->url('account/email');?>"><?php echo $this->language('Change Email');?></a></li>
				</ul>
			</div>
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('Picture');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('picture/category/index');?>"><?php echo $this->language('Category Index');?></a></li>
					<li>
						<a href="<?php echo $this->url('picture/special/index');?>"><?php echo $this->language('Special Index');?></a>
						<ul class="sub">
							<li><a href="<?php echo $this->url('picture/special/list');?>"><?php echo $this->language('All List');?></a></li>
							<li><a href="<?php echo $this->url('picture/special/list', array(), array('filter' => 'isolated'));?>"><?php echo $this->language('Isolated');?></a></li>
							<li>
								<a href="<?php echo $this->url('picture/special/recommend');?>"><?php echo $this->language('Recommends');?></a>
								-
								<a href="<?php echo $this->url('picture/special/regroup');?>"><?php echo $this->language('Group');?></a>
							</li>
						</ul>
					</li>
					<li><a href="<?php echo $this->url('picture/topic/index');?>"><?php echo $this->language('Topic Index');?></a></li>
					<li><a href="<?php echo $this->url('picture/photo/index');?>"><?php echo $this->language('Photo Index');?></a></li>
				</ul>
			</div>
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('Community');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('community/member/index');?>"><?php echo $this->language('Members');?></a></li>
					<li><a href="<?php echo $this->url('community/review/index');?>"><?php echo $this->language('Reviews');?></a></li>
				</ul>
			</div>
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('Collection');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('collection/site/index');?>"><?php echo $this->language('Source Sites');?></a></li>
					<li><a href="<?php echo $this->url('collection/list/item');?>"><?php echo $this->language('Items');?></a></li>
					<li><a href="<?php echo $this->url('collection/list/special');?>"><?php echo $this->language('Specials');?></a></li>
					<li><a href="<?php echo $this->url('collection/list/photo');?>"><?php echo $this->language('Photos');?></a></li>
					<li><a href="<?php echo $this->url('collection/list/error');?>"><?php echo $this->language('Error Logs');?></a></li>
				</ul>
			</div>
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('Resource');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('resource/keyword/index');?>"><?php echo $this->language('Keywords');?></a></li>
					<li><a href="<?php echo $this->url('resource/advertise/index');?>"><?php echo $this->language('Advertisements');?></a></li>
					<li><a href="<?php echo $this->url('resource/file/index');?>"><?php echo $this->language('Files');?></a></li>
					<li><a href="<?php echo $this->url('resource/link/index');?>"><?php echo $this->language('Links');?></a></li>
					<li><a href="<?php echo $this->url('resource/friendsite/index');?>"><?php echo $this->language('Friend Sites');?></a></li>
				</ul>
			</div>
			<hr/>
			<div class="item">
				<strong><?php echo $this->language('System');?></strong>
				<ul>
					<li><a href="<?php echo $this->url('system/setting/index');?>"><?php echo $this->language('Global Setting');?></a></li>
					<li><a href="<?php echo $this->url('system/user/index');?>"><?php echo $this->language('Users');?></a></li>
					<li><a href="<?php echo $this->url('system/setting/image');?>"><?php echo $this->language('Image Setting');?></a></li>
					<li><a href="<?php echo $this->url('system/setting/variate');?>"><?php echo $this->language('Variate Setting');?></a></li>
					<li>
						<a href="<?php echo $this->url('system/session/index');?>"><?php echo $this->language('Sessions');?></a>
						<ul class="sub"><?php 
							foreach(system_db::getAdapter()->query("SELECT DISTINCT `host` FROM `system_session`") AS $row) {
								echo '<li><a href="' . $this->url('system/session/list', array(), array('host' => $row['host'])) . '">' . $row['host'] . '</a></li>';
							}
						?></ul>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div id="switch"><a class="switch">Switch</a></div>
	<div id="frame"><iframe src="<?php echo $furl;?>" id="mainFrame" name="mainFrame"></iframe></div>
</div>
	

